using System;
using Unity.Burst;
using static DA.AnimGraph.TransitionConditionLink;

namespace DA.AnimGraph {
    [BurstCompile]
    public unsafe struct TransitionConditionVirtualTable {
        // Check
        //internal delegate bool CheckDelegate(in void* condition, in NodeLink node, in GraphContext graphContext);
        private void* CheckFunctionPtr;
        internal CheckDelegate CheckFunction {
            set { CheckFunctionPtr = BurstCompiler.CompileFunctionPointer(value).Value.ToPointer(); }
        }
        internal delegate* unmanaged[Cdecl]<in void*, in NodeLink, in GraphContext, bool> CheckFunctionCall {
            get => (delegate* unmanaged[Cdecl]<in void*, in NodeLink, in GraphContext, bool>)CheckFunctionPtr;
        }
    }
}
